<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<script type="text/javascript" src="js/jquery-3.1.1.min.js"></script>
<body>
<input type="button" value="点我显示数据" id="clickMe">
<table id="showTable" border="1">
    <tr>
        <td>姓名</td>
        <td>身份证</td>
        <td>错误状态</td>
        <td>错误信息</td>
    </tr>
</table>
<script>
    $("#clickMe").click(function () {
        var url = "listAction.action";

        $.ajax({
            type: "GET",
            url: url,
            dataType: "json",
            success: function (data) {
                $.each(data.list, function (i, item) {
                    var _tr = $("<tr>" +
                            "<td>" + item.name + "</td>" +
                            "<td>" + item.idCard + "</td>" +
                            "<td>" + item.status + "</td>" +
                            "<td>" + item.message + "</td>" +
                            "</tr>");
                    $("#showTable").append(_tr);
                });
            }
        });

    })
</script>
</body>
</html>
